the char will be shown ( so if you give 249h there will be an ù)
Good for password input
X = X Position
Y = Y Position
VS = TRUE means, xy are inside of an window
filler = FALSE -> Shows on the Inputfield in the length of ActLength the
char 249h
SHOW -> Shows the value of puffer (from above)
any other char
returns the termination key (ESC or ENTER or something like that)
int read_str(...
Same as read_ky, but even better. There is a line-editor in this function.
But .. the subst is not working any more, because nobody want to correct
something what is not visible. (Bad sentence, he .. i hope you understand)
void Write_ln(char *Text) and VWrite_ln(...
Writes the string "Text" direct into the video RAM.
Starting at cursor position.
After this function the cursor is in the next line. VWrite_ln is the
same function in a window.
void Write_(char *Text) and VWrite_(...
Same as Write_ln, except the cursor is still in there where he was.
By the way, if you write with this function, the cursor will not
move to the end of the text !!!!
void ClrScr()
Clear Screen (the hole one)
void VClrScr()
Clear virtuell Screen (the hole window)
void Err25(char *Text, int T, int B)
Put a Text in the foreground color T and background color B in the
last Screen line. This works with all Textmodes (25,28,43 ... lines).
void ErrMess(char *Text, int T, int B)
Opens a window a shows the Text in this window. The window will be always
in the middle of the screen starting in row 6 or so. It's nice because ...
Example : if ( (retcode = CloseWindow(ScrCnt)) != 0 )
{
ErrMess("Error detected .. no close possible",B_WHITE,GREY)
...
}
void numlout()
Lamp NUMLOCK goes out and you can use the cursor
void numlon()
Lamp NUMLOCK goes on and you can use the numeric block
void Sound(int Freq, int Timer)
Makes sound on the internal speaker. Forget Ctrl-G or 07h (Bell). Make
music with this function like Peter N. does.
void SetColLine(int x, int y, int Len, int VS, int Tcol, int Bcol)
Setting the foreground- and the backgroundcolor in a specified line. Good to use for mark a text or other stuff.
x = Position X
y = Position Y
Len = Length
VS = if TRUE -> X and Y are inside the last window
Tcol = foregrond color
Bcol = background color
int InitPrinter( int P_No)
Send a Init Signal to the Printer No. (P-No) LPT1 = 0, LPT2 = 1 .....
Attention : Breaks a running print command
Returns status of printer :
RC 1 = Time out
RC 8 = Error sending data
RC 10 = Online (no error)
RC 20 = Paper end
RC 40 = ACK
int Printing(char * text, int P_No)
Sending the print data direct to the printer. Checks the print command after every character. If the printer got a own buffer, there will be a Syncro-Routine. This print command is good, 'cause you don't loose data while printing.
Returns status of printer :
RC 0 = No Error
RC 1 = Time out
RC 8 = Error sending data
RC 18 = General failure
RC 20 = Paper end
RC 80 = Printer busy
int Easy_Printing(char * text, int P_No)
Same like above, but without errorcheck and Synco-Routine
int CheckDrive(char drive[2])
Check the status of a drive without using the DOS-Handles. You need this function to stop the DOS Message (A)bort, (R)etry, (F)ailure.... Now you got the chance for a reaction.
Returns Hexa:
RC 0 = No error
RC 1 = Invalid function or drive not present
RC 2 = Adress not found
RC 3 = Write protected (only floppy)
RC 4 = Sector not found
RC 5 = Controller error reset (only HDD)
RC 7 = Init failure controller (only HDD)
RC 8 = DMA Error (Overflow) only floppy
RC 9 = Buffer > 64 KByte (only floppy)
Parity Error ( only HDD)
RC A = Sector defect (only HDD)
RC 10 = Error while reading drive
RC 20 = Error floppy controller
Controller defect (only HDD)
RC 40 = Track not found (only floppy)
Operation breaks or fail
RC 80 = Time-Out
RC AA = HDD not ready (only HDD)
RC CC = Error while writing (only HDD)
char * Get_Date()
Get the date and store in intern field Get_Date (dd.mm.yy).
char * Get_Time()
Get the time and store in intern field Get_Time (hh:mm)
void delay(int _tick_)
Pausing the running prozess for _tick_ millisec. (1 Sec. = 1000)
int JN (... *only for german version interessting)
void GoOn()
Only for german version interessting
void Reboot()
Reboots the pc like the "reset"-button. Reboot with RAM-Refresh.
signed int In_Box(int tc, int bc, int bar, int len, char * text,...)
(ohoh, hard to explain .. i'll start with the parameters)
tc = forground color
bc = backgound color
bar = color of a bar
len = the size of the greatest text
text = list of strings, ends with the NULL pointer
Vgotoxy(1,1); /* you MUST set the cursor to the start of the text */
if ( In_Box(CYAN,BLUE,RED,6,"END","CHANGE",NULL) == 1 ) exit(0);
else ...
ATTENTION : You have to set the cursor to the begin of the starting text !!
(Okay .. i'll try to explain)
There is a automatic to make a choice for a routine. So, the value of return gives you the no. of the text you gave into the function. If you take a look to the example, END is the return value 1 and CHANGE is the return value 2. The user will have a bar on the screen and moves the bar with the UP- and DOWN keys.
(i hope you understand)
char get_char( int x, int y)
Reads and retruns a character from screen and the position XY
Byte in_key_buf(Byte c)
Stores the character c in the keyboard buffer. So you can define macros or make demos by storing and reading the inputkeys from a file.
Easy to handle.
void ebc_to_asc(char *ptr, int len)
Convert EBCDIC data to ASCII data starting and the adress of ptr with a length of len. Attention : The data will be converted directly
All you need are the files PULLDOWN.H and PULLDOWN.INC.
Description of the PULLDOWN.H file :
Before using and change this file, make a copy for your project with a user defined name. DON'T delete the defines P_ESC, P_LEFT, P_RIGHT, NEXT and TEXTSUM_FAILURE.
HEADLINE : Define aour headline and end with the NULL pointer
PULLDOWNS : Define your pulldown menu for each HEADLINE Keyword. Step to the next keyword with NEXT and stop with the NULL pointer
TOPCOLOR : Foreground color HEADLINE
DOWNCOLOR : Background color HEADLINE
MENU_TC : Foreground color PULLDOWN
MENU_BC : Background color PULLDOWN
HIGHTEXT : Foreground color text on the bar
LOWTEXT : Background color bar
Description of the PULLDOWN.INC file :
There is no reason to change this file. All you have to do is to INCLUDE this file in your source file.
USING :
INCLUDE the file PULLDOWN.H and PULLDOWN.INC (or whatever they named now)